<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加转换</title>
    <link href="../static/css/plugins/jsTree/style.min.css" rel="stylesheet">
    <link href="../static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="../static/css/animate.css" rel="stylesheet">
    <link href="../static/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>添加转换</h5>
            <div class="ibox-tools">
                <a class="collapse-link">
                    <i class="fa fa-chevron-up"></i>
                </a>
                <a class="close-link">
                    <i class="fa fa-times"></i>
                </a>
            </div>
        </div>
        <div class="ibox-content">
            <form class="form-horizontal m-t" id="RepositoryTransForm">
                <div class="form-group">
                    <label class="col-sm-3 control-label required" for="transType">执行方式：</label>
                    <div class="col-sm-7">
                        <select id="transType" name="executeType" class="form-control" aria-required="true">
                            <option value="" selected>请选执行方式</option>
                        </select>
                    </div>
                </div>
                <div class="form-group sync-field" data-field="file">
                    <label class="col-sm-3 control-label required" for="location">转换上传：</label>
                    <div class="col-sm-7">
                        <div class="input-group">
                            <input id='location' type="text" name="location" readonly class="form-control"
                                   placeholder="请上传转换" aria-required="true">
                            <label class="input-group-btn">
                                <input type="button" value="上传转换" class="btn btn-primary"
                                       onclick="$('#transFile').click();">
                            </label>
                        </div>
                        <input id="transFile" name="transFile" type="file" class="form-control" style="display: none"
                               aria-required="true">
                    </div>
                </div>
                <div class="form-group sync-field" data-field="rep">
                    <label class="col-sm-3 control-label required" for="transRepositoryId">资源库：</label>
                    <div class="col-sm-7">
                        <select id="transRepositoryId" name="scriptRepositoryId" class="form-control"
                                aria-required="true">
                            <option value="" selected>请选择资源库</option>
                        </select>
                    </div>
                </div>
                <div class="form-group sync-field" data-field="rep">
                    <label class="col-sm-3 control-label required" for="scriptType">采集类型:</label>
                    <div class="col-sm-7">
                        <select id="scriptType" name="scriptType" class="form-control" aria-required="true">
                            <option value="1" selected>转换</option>
                            <option value="0">作业</option>
                        </select>
                    </div>
                </div>
                <div class="form-group sync-field" data-field="rep">
                    <label class="col-sm-3 control-label required" for="transPath">转换路径：</label>
                    <div class="col-sm-7">
                        <input id="transPath" readonly name="scriptPath" type="text" placeholder="请选择转换"
                               class="form-control" aria-required="true">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label required" for="transName">转换名称：</label>
                    <div class="col-sm-7">
                        <input id="transName" name="scriptName" type="text" placeholder="请输入转换名称" class="form-control"
                               aria-required="true" readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label required" for="transName">转换参数：</label>
                    <div class="col-sm-7">
                        <input id="transParams" name="scriptParams" type="text" placeholder="请输入转换参数"
                               class="form-control" aria-required="true" value="{}" readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label" for="categoryId">任务分类：</label>
                    <div class="col-sm-7">
                        <select id="categoryId" name="categoryId" class="form-control" aria-required="true">
                            <option value="" selected>请选择任务分类</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label required" for="transQuartz">定时策略：</label>
                    <div class="col-sm-7">
                        <select id="transQuartz" name="scriptQuartz" class="form-control" aria-required="true">
                            <option value="" selected>请选择定时策略</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label" for="syncStrategy">同步策略：</label>
                    <div class="col-sm-7">
                        <input id="syncStrategy" name="syncStrategy" type="text" placeholder="请输入同步策略"
                               class="form-control" aria-required="true">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label required" for="transLogLevel">记录日志级别：</label>
                    <div class="col-sm-7">
                        <select id="transLogLevel" name="scriptLogLevel" class="form-control">
                            <option value="">请选择日志级别</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label required">失败重试：</label>
                    <div class="col-sm-7">
                        <select id="transFailMethond" name="transFailMethond" class="form-control">
                            <option value="">请选择失败重试策略</option>
                            <option value="0">不执行重试</option>
                            <!-- <option value="1">当前任务</option>-->
                            <option value="2">其他任务</option>
                        </select>
                    </div>
                </div>
                <div class="form-group" id="failRetryTimeDiv" style="display:none">
                    <label class="col-sm-3 control-label">重试时间(S)：</label>
                    <div class="col-sm-7">
                        <input id="failRetryTime" name="failRetryTime" type="text" placeholder="当前任务失败后，多少秒内执行重试"
                               class="form-control">
                    </div>
                </div>
                <div class="form-group" id="failRetryJobDiv" style="display:none">
                    <label class="col-sm-3 control-label">重试任务：</label>
                    <div class="col-sm-7">
                        <input id="failRetryScriptPath" name="failRetryScriptPath" type="text" placeholder="请选择重试任务"
                               class="form-control" readonly>
                    </div>
                </div>
                <div class="form-group"style="display:none">
                    <label class="col-sm-3 control-label">重试任务：</label>
                    <div class="col-sm-7">
                        <input id="failRetryScriptName" name="failRetryScriptName" type="text" placeholder="重试任务名称"
                               class="form-control" readonly>
                        <input id="failRetryScriptID" name="failRetryScriptID" type="text" placeholder="重试作业ID"
                               class="form-control" readonly>
                    </div>
                </div>
                <div class="form-group" style="display:none">
                    <label class="col-sm-3 control-label required">重试参数：</label>
                    <div class="col-sm-7">
                        <input id="failRetryParams" name="failRetryParams" type="text" placeholder="请输入重试参数"
                               class="form-control" value="{}" readonly>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label" for="transDescription">转换描述：</label>
                    <div class="col-sm-7">
                        <textarea id="transDescription" name="scriptDescription" placeholder="请输入转换描述，不超过500字"
                                  class="form-control" aria-required="true"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-9 col-sm-offset-3">
                        <button class="btn btn-w-m btn-primary" type="submit"><i class="fa fa-check"
                                                                                 aria-hidden="true"></i>&nbsp;保存
                        </button>
                        <button class="btn btn-w-m btn-primary" type="button" onclick="cancel()"><i class="fa fa-reply"
                                                                                                    aria-hidden="true"></i>&nbsp;取消
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- 全局js -->
<script src="../static/js/jquery.min.js?v=2.1.4"></script>
<!-- jQuery Validation plugin javascript-->
<script src="../static/js/plugins/validate/jquery.validate.min.js"></script>
<script src="../static/js/plugins/validate/messages_zh.min.js"></script>
<script src="../static/js/bootstrap.min.js?v=3.3.6"></script>
<!-- layer javascript -->
<script src="../static/js/plugins/layer/layer.min.js"></script>
<!-- Bootstrap table -->
<script src="../static/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="../static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="../static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<!-- 自定义js -->
<script src="../static/js/content.js?v=1.0.0"></script>
<script src="../static/js/plugins/jsTree/jstree.min.js"></script>
<script src="../static/js/my/trans-add.js"></script>
</body>
</html>